/*
    Copyright (c) Guangzhou Data Control Network Technology Co., Ltd. All rights reserved.
    Licensed under the MIT License.
    contact:dcdev_founder@foxmail.com
*/
// 引用用户分组显示
$("#_dc_textarea_").load("https://res.dcdev.net/dcdev/v1.0.6/assets/html/highlight_syntax.html", "", function () {
    debugger;
    var mixedMode = {
        name: "htmlmixed",
        scriptTypes: [{
            matches: /\/x-handlebars-template|\/x-mustache/i,
            mode: null
        },
        {
            matches: /(text|application)\/(x-)?vb(a|script)/i,
            mode: "vbscript"
        }
        ]
    };

    function hightlight_syntax(textarea_id, lineNumbers = false) {
        return CodeMirror.fromTextArea(document.getElementById(textarea_id), {
            mode: mixedMode,
            selectionPointer: true,
            lineNumbers: lineNumbers,
            matchBrackets: true,
            indentUnit: 4,
            indentWithTabs: true
        });
    }
})

